package com.xiaocheng.core.memento;

public class Client {
	public static void main(String[] args) {
		Originator originator = new Originator();
		Creater creater = new Creater(originator);
		originator.setStatus( "status 1");
		creater.createMemento();
		originator.printStatus();
		originator.setStatus("status 2");
		creater.createMemento();
		originator.printStatus();
		creater.restoreMemento(creater.getIndex()-1);
		originator.printStatus();
	}
}
